package com.eva.shiro.session;

import com.eva.framework.rbac.model.RbacUserInfo;
import com.eva.framework.rbac.session.SessionAdapter;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;

@Component
public class ShiroSessionAdapter implements SessionAdapter {

    @Override
    public RbacUserInfo getLoginUser() {
        return (RbacUserInfo) SecurityUtils.getSubject().getPrincipal();
    }
}
